package cn.wolfcode.luowowo.article.query;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * 游记查询范围条件
 */
@Getter
public class TravelCondition {

    public static final HashMap<Integer,TravelCondition> dayMap = new HashMap<>();
    public static final HashMap<Integer,TravelCondition> travelTimeMap = new HashMap<>();
    public static final HashMap<Integer,TravelCondition> perExpendMap = new HashMap<>();

    static{
        //出行天数
        dayMap.put(1,new TravelCondition(0,3));
        dayMap.put(2,new TravelCondition(4,7));
        dayMap.put(3,new TravelCondition(8,14));
        dayMap.put(4,new TravelCondition(15,Integer.MAX_VALUE));

        //出发时间
        travelTimeMap.put(1,new TravelCondition(1,2));
        travelTimeMap.put(2,new TravelCondition(3,4));
        travelTimeMap.put(3,new TravelCondition(5,6));
        travelTimeMap.put(4,new TravelCondition(7,8));
        travelTimeMap.put(5,new TravelCondition(9,10));
        travelTimeMap.put(6,new TravelCondition(11,12));

        //人均花费
        perExpendMap.put(1,new TravelCondition(1,999));
        perExpendMap.put(2,new TravelCondition(1000,6000));
        perExpendMap.put(3,new TravelCondition(6001,20000));
        perExpendMap.put(4,new TravelCondition(20001,Integer.MAX_VALUE));
    }

    private int min;
    private int max;
    public TravelCondition(int min,int max){
        this.min = min;
        this.max = max;
    }

}
